package cn.tedu.imop.handler;

import com.xxl.job.core.biz.model.ReturnT;
import com.xxl.job.core.handler.annotation.XxlJob;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.RequestBody;

@Component
public class XxlJobDemoHandler {

    @XxlJob("doJobHandler")
    public ReturnT<String> doJobHandler() {
        String threadName=Thread.currentThread().getName();
        System.out.println(threadName +" java, Hello xxl-job ~~~,"+System.currentTimeMillis());
        return ReturnT.SUCCESS;
    }
    @XxlJob("doCostHandler")
    public ReturnT<String> doCostHandler(String orderId) {
        System.out.println(orderId+" do cost "+System.currentTimeMillis());
        return ReturnT.SUCCESS;
    }
}
